const ajaxQuery = (url) => {
  return new Promise((resolve, reject) => {
    const http = new XMLHttpRequest();
    http.open("GET", url);
    http.responseType = "json";
    http.onload = function () {
      if (this.status === 200) {
        resolve(this.response);
      } else {
        reject(new Error(this.statusText));
      }
    };
    http.send()
  });
};

ajaxQuery("/02-test/data.json").then(
  (result) => {
    console.log(result);
  },
  (error) => {
    console.log(error);
  }
);
console.log("哈哈哈e")